<?php
?>
<?php include '../../common/view/headermodel.html.php';?>
<?php
css::import($jsRoot . 'jquery/chosen/chosen.min.css');
js::import($jsRoot . 'jquery/chosen/chosen.min.js');
?>
<style>
  .table-form > tbody > tr > th, .table-form > tbody > tr > td {
    padding: 5px;
  }
  li{list-style-type: none;}
  span.liandai {float: left;width: 15%;}
  .chosen-container{width: 85% ! important;}
  .morelian{display: none;}
  .morelian2{display: none;}
</style>
<?php if(!in_array($this->app->user->id_card,$process->idcard)&&$ismonitors&&$process->approval_status=='doing') :?>
<form method='post' id='ajaxForm'  action='<?php echo inlink('approval',"id=$process->id")?>'  class='form' name="form1" enctype="multipart/form-data">
  <table class='table-form w-p90'>
    <tr>
      <th class='w-80px'><?php echo $lang->process->monitors;?></th>
      <td class='w-p60'>
        <input class="form-control" id="monitors_idcard" name="monitors_idcard" value="<?php echo $process->monitors_idcard ?>" type="text"  readonly>
      </td>
    </tr>

    <tr>
      <th class='w-80px'><?php echo $lang->process->department;?></th>
      <td>
        <input class="form-control" id="department" name="department" value="<?php echo $process->department_name ?>" type="text"  readonly>
      </td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->process->desc;?></th>
      <td colspan='2'><?php echo html::textarea('desc', $process->m_content, "rows='6' class='form-control' readonly" );?></td>
    </tr>
    <?php foreach($files as $file) :?>
      <tr>
        <th><?php echo $lang->process->attachment;?></th>
        <td colspan='2'><?php echo html::a($webRoot.'www/data/upload/'.$file->pathname,$file->title,"target='_blank'");?></td>
      </tr>
    <?php endforeach ?>
    <tr>
      <th><?php echo $lang->process->confirm;?></th>
      <td><input class="form-control" id="department_heads" name="department_heads" value="<?php echo $process->department_heads ?>" type="text"  readonly>
      </td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->process->concerned;?></th>
      <td><input class="form-control" id="concerned" name="concerned" value="<?php echo $process->personnel ?>" type="text"  readonly>
      </td><td></td>
    </tr>
    <tr>
      <th><?php echo $lang->process->p_content;?></th>
      <td colspan='2'><?php echo html::textarea('p_content', $process->p_content, "rows='6' class='form-control' readonly" );?></td>
    </tr>
    <?php foreach($afiles as $file) :?>
      <tr>
        <th><?php echo $lang->process->p_attachment;?></th>
        <td colspan='2'><?php echo html::a($webRoot.'www/data/upload/'.$file->pathname,$file->title,"target='_blank'");?></td>
      </tr>
    <?php endforeach ?>
    <tr>
      <th class='w-80px'><?php echo $lang->process->leixing;?></th>
      <td><?php echo html::select('type[]', $types, $process->type, "class='form-control chosen-select' multiple");?></td>
    </tr>
      <tr>
        <th><?php echo $lang->process->approval_content;?></th>
        <td colspan='2'><?php echo html::textarea('approval_content', $process->approval_content, "rows='6' class='form-control'" );?></td>
      </tr>
    <tr>
      <th>连带责任</th>
      <td>
      <li ><span class="liandai">部门</span><?php echo html::select('unit1', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user1', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory1', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category1[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>
        <a class="btn addItem"><i class="icon icon-plus"></i></a>
        <a class="btn delItem"><i class="icon icon-remove"></i></a>
      </td>
    </tr>

    <tr class="morelian">
      <th>连带责任</th>
      <td>
        <li ><span class="liandai">部门</span><?php echo html::select('unit2', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user2', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory2', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category2[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>
      </td>
    </tr>

    <tr class="morelian">
      <th>连带责任</th>
      <td>
        <li ><span class="liandai">部门</span><?php echo html::select('unit3', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user3', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory3', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category3[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>
        <a class="btn addItem2"><i class="icon icon-plus"></i></a>
        <a class="btn delItem2"><i class="icon icon-remove"></i></a>
      </td>
    </tr>

    <tr class="morelian2">
      <th>连带责任</th>
      <td>
        <li ><span class="liandai">部门</span><?php echo html::select('unit4', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user4', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory4', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category4[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>

      </td>
    </tr>


    <tr class="morelian2">
      <th>连带责任</th>
      <td>
        <li ><span class="liandai">部门</span><?php echo html::select('unit5', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user5', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory5', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category5[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>
      </td>
    </tr>

    <tr class="morelian2">
      <th>连带责任</th>
      <td>
        <li ><span class="liandai">部门</span><?php echo html::select('unit6', $unit, '', "class='luser form-control chosen-select'");?></li>
        <li> <span class="liandai"> 人员</span><?php echo html::select('user6', '', '', "class='ltype form-control chosen-select'");?></li>
        <li> <span class="liandai">大分类</span><?php echo html::select('bigcategory6', $bigtype, '', "class='luser form-control chosen-select'");?></li>
        <li>  <span class="liandai">小分类</span><?php echo html::select('category6[]', '', '', "class='ltype form-control chosen-select' multiple");?></li>
      </td>
      <td>
      </td>
    </tr>
    <tr>
      <th class='w-80px'><?php echo $lang->process->scoretype;?></th>
      <td>
        <?php echo html::select('scoretype', $this->lang->process->typeList,'', "class='form-control chosen-select'");?>
      </td><td></td>
    </tr>
    <tr>
      <th class='w-80px'><?php echo $lang->process->istrue;?></th>
      <td class='w-p60'>
        <?php echo html::radio('istrue',$lang->process->istruelist,"class='form-control'");?>
      </td><td></td>
    </tr>

    <tr><th></th><td><?php echo html::submitButton();?></td></tr>
  </table>
  </form>
<?php endif ?>
<?php include '../../common/view/footermodel.html.php';?>
